package org.obm.cassandra;

import org.apache.cassandra.server.CassandraNodeActivator;
import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class NodeApplication implements IApplication {

	private Logger logger = LoggerFactory.getLogger(getClass());
	
	@Override
	public Object start(IApplicationContext context) throws Exception {
		logger.info("starting Cassandra node");
		CassandraNodeActivator.getDefault();
		logger.info("Cassandra node started");
		return IApplication.EXIT_OK;
	}

	@Override
	public void stop() {
		logger.info("Stopping Cassandra node application");
	}

}
